﻿ALTER TABLE [dbo].[Device]
    ADD CONSTRAINT [FK_Device_Device] FOREIGN KEY ([ParentDeviceId]) REFERENCES [dbo].[Device] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION;


GO
ALTER TABLE [dbo].[Device] NOCHECK CONSTRAINT [FK_Device_Device];

